<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:a4j="http://richfaces.org/a4j">

<ui:composition template="/templates/principal_template.xhtml">
	<ui:define name="pageTitle">Login - jMed Systems</ui:define>
	<ui:define name="pageScrips"></ui:define>
	<ui:define name="pageCss"></ui:define>

	<ui:define name="imgTopContent"></ui:define>
	<ui:define name="imgTopLabelContent"></ui:define>
	<ui:define name="label_page_content"></ui:define>
	<p></p>

	<ui:define name="imgTopLabelContent">
		<p>Consulta Tipo Acomodação</p>
	</ui:define>

	<ui:define name="contentMain">
		<h:form id="form-tipo-acomodacao-busc">
			<rich:panel>
				<rich:messages />
				<h:panelGrid columns="2">


					<h:outputText value="Codigo" />
					<h:inputText value="#{tipoAcomodacaoControl.tipoAcomodacao.codigo}" />

					<h:outputText value="Descrição" />
					<rich:autocomplete
						value="#{tipoAcomodacaoControl.tipoAcomodacao.descricao}"
						autocompleteMethod="#{tipoAcomodacaoControl.pesquisarAutoCompTipoAcomodacao}"
						mode="lazyClient" />

					<h:commandButton
						action="#{tipoAcomodacaoControl.pesquisarTipoAcomodacao()}"
						value="Pesquisar" />

					<h:commandButton
						action="#{tipoAcomodacaoControl.novoCadastroTipoAcomodacao()}"
						value="Novo" />
				</h:panelGrid>
			</rich:panel>
		</h:form>
		<br />

		<rich:dataTable style="width: 100%" id="grid-pesq-tipoAcomodacao"
			value="#{tipoAcomodacaoControl.listTipoAcomodacao}"
			var="tipoAcomodacao">
			<f:facet name="header">
				<rich:columnGroup>
					<rich:column style="width: 10%">
						<h:outputText value="Código" />
					</rich:column>
					<rich:column style="width: 65%;">
						<h:outputText value="Descrção" />
					</rich:column>

					<rich:column style="width: 15%;">
						<h:outputText value="Opções" />
					</rich:column>

				</rich:columnGroup>
			</f:facet>
			<rich:column>
				<h:outputText value="#{tipoAcomodacao.codigo}" />
			</rich:column>
			<rich:column>
				<h:outputText value="#{tipoAcomodacao.descricao}" />
			</rich:column>
			<rich:column>
				<h:panelGrid columns="2">
					<h:form id="form-act-tipoAcomodacao">
						<h:commandButton
							action="#{tipoAcomodacaoControl.abrirAlterarTipoAcomodacao(tipoAcomodacao)}"
							image="/templates/images/document_edit.png" id="btnAlterar">
							<rich:tooltip value="Alterar" />
						</h:commandButton>
							
					</h:form>
				</h:panelGrid>
			</rich:column>
		</rich:dataTable>
	</ui:define>
</ui:composition>

</html>